package compiler.syntax.nonTerminal;

import compiler.CompilerContext;

import compiler.semantic.type.TypeProcedure;

import es.uned.lsi.compiler.intermediate.IntermediateCodeBuilder;
import es.uned.lsi.compiler.semantic.ScopeIF;

public class InvocacionFuncion extends NonTerminal {

	public InvocacionFuncion() {
		super();
	}
	
    public void generarCodigoIntermedio(TypeProcedure t, Parametros p){
    	ScopeIF scope = CompilerContext.getScopeManager().getCurrentScope();
    	IntermediateCodeBuilder cb = new IntermediateCodeBuilder(scope);
    	cb.addQuadruples(p.getIntermediateCode());    	
    	cb.addQuadruple ("CALL", t);
    	this.setIntermediateCode(cb.create());    	
    }
	

}
